<div class="dux-box">
    <div class="box-header">微信支付</div>
    <div class="am-text-center">
        <p class="am-padding">请打开微信扫码以下二维码支付</p>
        <div id="qrcode" class="am-text-center"></div>
        <h1 class="am-margin-top-xs">
            <p>支付金额</p>
            <span class="am-text-danger">￥{$money}</span>
        </h1>
        <p>
            <a class="" href="javascript:location.reload();">
                支付成功后若无自动跳转请点击刷新
            </a>
        </p>
        <br>
    </div>
</div>
<script>
    Do('base', function() {
        $('#qrcode').qrcode({
            text: "{$code}",
            width: 200,
            height: 200
        });
        var refresh = function() {
            app.ajax({
                tip : false,
                url : '{url("status")}',
                type : 'post',
                data : {
                    order_no : '{$orderNo}'
                },
                success : function(info) {
                    window.location.reload();
                },
                error : function() {
                    setTimeout(function(){
                        refresh();
                    }, 3000);
                }
            });
        };
        refresh();
    });
</script>